package org.example.dataStructure.queue;

public class TestQueue {
    public static void main(String[] args) {
        MyQueue<String> queue = new MyQueue<>();
        queue.put("1");
        queue.put("2");
        queue.put("3");
        System.out.println("首个元素: "+queue.peek());
        System.out.println("队列还剩余: "+queue.size());
        int o = queue.size();
        for (int i = 0; i < o; i++) {
            System.out.println("第"+(i+1)+"个元素的值: "+queue.poll());
        }
        System.out.println("队列还剩余: "+queue.size());
    }
}
